Skip to main content

Import

Usage

Return Type: UseSwapModalReturnType

The hook returns an object with the following properties:

Properties

openSwapModal

(settings: SwapModalSettings) => void Function to open the Swap modal with the specified settings. Parameters: The settings object can include the following properties:

closeSwapModal

() => void Function to close the Swap modal.

swapModalSettings

SwapModalSettings | undefined The current settings configuration for the Swap modal.

Notes

This hook provides methods to control the Swap modal that allows users to swap tokens in their wallet to a target currency. The Swap modal enables users to select tokens from their wallet to swap to a specified target token, with the option to execute additional transactions after the swap completes.